package com.ajr.core;

import java.util.HashSet;

import se.codevision.jinterlink.JInterLinkException;
import se.codevision.jinterlink.registers.InvoiceHead;
import se.codevision.jinterlink.registers.JInterLinkRegisterFactory;

public class OrderReader {
	public static HashSet readIds() throws JInterLinkException {
		HashSet hasSet = new HashSet();
		InvoiceHead article = JInterLinkRegisterFactory.createInvoiceHead();
		 
		
		 boolean s = article.firstRecord();
		 
		 int count = 0;
		 while(s) {
			 /*System.out.println(article.getDocumentNumber()+ " "+article.getCustomerNumber()+" "+article.getCustomerName()+" "+article.getCustomerName()+article.getStr(0));
			 System.out.println("SS Name "+
					 article.getDataStructure().getField(ADK_OOI_ROW_SERIAL_NUMBER).getId());*/
			 hasSet.add(article.getCustomerOrderNumber());
			 s = article.nextRecord();
			 count++;
		 }
		 
		 
		 
//		 System.out.println("status "+s);		
		
		return hasSet;
	}

}
